{include file='comdir/head.html'}
<body>
<div class="content">
	<div class="animated fadeInDown">
		<div class="pos"><a href="#" onClick="javascript :history.back(-1);">返回上一页</a></div>
		<form class="form-horizontal" action="javascript:void(0)" id='frm'>
			<div class="form-group">
				<label class="col-sm-2 control-label">分类名称</label>
				<div class="col-sm-5">
					<input type="text" class="form-control" name="classname" value="{$list.classname}">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">描述</label>
				<div class="col-sm-5" style="display: inline-block;vertical-align: middle;">
				<textarea class="form-control" name="description">{$list.description}</textarea>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-5">
					<input type="hidden" name="classid" value='{$list.classid}'>
					<input type="button" class="btn btn-block btn-blue sub" name="name" value="提交">
				</div>
			</div>
		</form>
	</div>
</div>
<script type="text/javascript">
var _URL='{$_URL}';
{literal}
ajax_status=true;
$(function(){
	$('.sub').click(function(){
		var url=_URL+"Link/classedit";
		var formjquery=_ajaxs.from('#frm');
		if(ajax_status===false){return false;}
		ajax_status=false;
		_ajaxs.post(url,'formjquery='+formjquery,function _result(data){
			ajax_status=true;
			layer.msg(data.msg,{icon: 1}, function(){
				if(data.status){
					window.location.href=_URL+"Link/classlists";
				}
			});
		});
	})
})
{/literal}
</script>
</body>
</html>
